Ext.define('Admin.view.leaveapprove.ReportBackForm', {
    extend: 'Ext.form.Panel',
    id:'leaveapprove_reportBack_form',
    alias: 'widget.leaveapprove_reportBack_form',
    requires: [
        'Ext.button.Button',
        'Ext.form.RadioGroup',
        'Ext.form.field.*'
        
        
    ],
    controller: 'leaveapprove',
    bodyPadding: 10,
    bodyBorder: true,


    defaults: {
        anchor: '100%',
    },
    fieldDefaults: {
        labelAlign: 'top',
        msgTarget: 'qtip',
        allowBlank:false,
        blankText:'该项不能为空'
    },
    

    items: [{
        xtype: 'datefield',
        fieldLabel: '实际请假开始时间',
        format: 'Y/m/d H:i:s', 
        name: 'realityStartTime',
        //,id: 'startdt',
        //vtype: 'daterange',
        //endDateField: 'enddt' // id of the end date field
        listeners:{
            change:function(){
                Ext.getCmp('leaveRealityEndTime').setMinValue(this.value);
            }
        }
    },{
        id:'leaveRealityEndTime',
        xtype: 'datefield',
        fieldLabel: '实际请假结束时间',
        format: 'Y/m/d H:i:s', 
        name: 'realityEndTime'
        //,id: 'enddt',
        //vtype: 'daterange',
        //startDateField: 'startdt' // id of the start date field
    },{
        xtype:'hidden',
        name:'taskId'
    },{
        xtype:'hidden',
        name:'id'
    },{
        xtype:'hidden',
        name:'taskDefinitionKey'
    }],

   	bbar: [{
		xtype: 'button',
		ui: 'soft-green',
		text: '提交'	,
		handler: 'onClickReportBackFormSubmitButton'
	},{
		xtype: 'button',
		ui: 'gray',
		text: '取消',
		handler:function(btn){
			var win = btn.up('window');
	        if (win) {
	            win.close();
	        }
		}
	}]
});
